<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery.js"></script>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        ul {
            list-style: none;

        }

        body {
            background: #000;
        }

        .wrap {
            margin: 100px auto 0;
            width: 630px;
            height: 394px;
            padding: 10px 0 0 10px;
            background: #000;
            overflow: hidden;
            border: 1px solid #fff;
        }

        .wrap li {
            float: left;
            margin: 0 10px 10px 0;

        }

        .wrap img {
            display: block;
            border: 0;
        }
    </style>
</head>
<body>
    <div class="wrap">
        <ul>
            <li><a href="#"><img src="images/01.jpg" alt="" /></a></li>
            <li><a href="#"><img src="images/02.jpg" alt="" /></a></li>
            <li><a href="#"><img src="images/03.jpg" alt="" /></a></li>
            <li><a href="#"><img src="images/04.jpg" alt="" /></a></li>
            <li><a href="#"><img src="images/05.jpg" alt="" /></a></li>
            <li><a href="#"><img src="images/06.jpg" alt="" /></a></li>
        </ul>
    </div>
    <script>
        $.fn.extend({
            up(){
                this.find("li").mouseenter(function(){
                    $(this).css("opacity",1)
                    $(this).siblings().css("opacity",0.4)
                })
                this.mouseleave(function(){
                    $(this).find("li").css("opacity",1)
                })
            }
        })


        $(function(){
            $(".wrap").up();
        })
    </script>
</body>
</html>